package com.yanggu.bigdata.realtime.bean;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;

public class ProductStats implements Serializable {

    //窗口时间字段
    /**
     * 窗口起始时间
     */
    private String stt;

    /**
     * 窗口结束时间
     */
    private String edt;

    //维度字段
    /**
     * sku 编号
     */
    private Long sku_id;

    /**
     * sku 名称
     */
    private String sku_name;

    /**
     * sku 单价
     */
    private BigDecimal sku_price;

    /**
     * spu 编号
     */
    private Long spu_id;

    /**
     * spu 名称
     */
    private String spu_name;

    /**
     * 品牌编号
     */
    private Long tm_id;

    /**
     * 品牌名称
     */
    private String tm_name;

    /**
     * 品类编号
     */
    private Long category3_id;

    /**
     * 品类名称
     */
    private String category3_name;

    //度量字段
    /**
     * 曝光数
     */
    private Long display_ct = 0L;

    /**
     * 点击数
     */
    private Long click_ct = 0L;

    /**
     * 收藏数
     */
    private Long favor_ct = 0L;

    /**
     * 添加购物车数
     */
    private Long cart_ct = 0L;

    /**
     * 下单商品个数
     */
    private Long order_sku_num = 0L;

    /**
     * 下单商品金额
     */
    private BigDecimal order_amount = BigDecimal.ZERO;

    /**
     * 退款金额
     */
    private BigDecimal refund_amount = BigDecimal.ZERO;

    /**
     * 支付金额
     */
    private BigDecimal payment_amount = BigDecimal.ZERO;

    /**
     * 评论订单数
     */
    private Long comment_ct = 0L;

    /**
     * 好评订单数
     */
    private Long good_comment_ct = 0L;

    /**
     * 订单数
     */
    private Long order_ct = 0L;

    /**
     * 支付订单数
     */
    private Long paid_order_ct = 0L;

    /**
     * 退款订单数
     */
    private Long refund_order_ct = 0L;

    //辅助字段
    /**
     * 用于统计订单数
     */
    @TransientSink
    private Set<Long> orderIdSet = new HashSet<>();

    /**
     * 用于统计支付订单数
     */
    @TransientSink
    private Set<Long> paidOrderIdSet = new HashSet<>();

    /**
     * 用于退款支付订单数
     */
    @TransientSink
    private Set<Long> refundOrderIdSet = new HashSet<>();

    /**
     * 统计时间戳
     */
    private Long ts = 0L;

    public String getStt() {
        return stt;
    }

    public void setStt(String stt) {
        this.stt = stt;
    }

    public String getEdt() {
        return edt;
    }

    public void setEdt(String edt) {
        this.edt = edt;
    }

    public Long getSku_id() {
        return sku_id;
    }

    public void setSku_id(Long sku_id) {
        this.sku_id = sku_id;
    }

    public String getSku_name() {
        return sku_name;
    }

    public void setSku_name(String sku_name) {
        this.sku_name = sku_name;
    }

    public BigDecimal getSku_price() {
        return sku_price;
    }

    public void setSku_price(BigDecimal sku_price) {
        this.sku_price = sku_price;
    }

    public Long getSpu_id() {
        return spu_id;
    }

    public void setSpu_id(Long spu_id) {
        this.spu_id = spu_id;
    }

    public String getSpu_name() {
        return spu_name;
    }

    public void setSpu_name(String spu_name) {
        this.spu_name = spu_name;
    }

    public Long getTm_id() {
        return tm_id;
    }

    public void setTm_id(Long tm_id) {
        this.tm_id = tm_id;
    }

    public String getTm_name() {
        return tm_name;
    }

    public void setTm_name(String tm_name) {
        this.tm_name = tm_name;
    }

    public Long getCategory3_id() {
        return category3_id;
    }

    public void setCategory3_id(Long category3_id) {
        this.category3_id = category3_id;
    }

    public String getCategory3_name() {
        return category3_name;
    }

    public void setCategory3_name(String category3_name) {
        this.category3_name = category3_name;
    }

    public Long getDisplay_ct() {
        return display_ct;
    }

    public void setDisplay_ct(Long display_ct) {
        this.display_ct = display_ct;
    }

    public Long getClick_ct() {
        return click_ct;
    }

    public void setClick_ct(Long click_ct) {
        this.click_ct = click_ct;
    }

    public Long getFavor_ct() {
        return favor_ct;
    }

    public void setFavor_ct(Long favor_ct) {
        this.favor_ct = favor_ct;
    }

    public Long getCart_ct() {
        return cart_ct;
    }

    public void setCart_ct(Long cart_ct) {
        this.cart_ct = cart_ct;
    }

    public Long getOrder_sku_num() {
        return order_sku_num;
    }

    public void setOrder_sku_num(Long order_sku_num) {
        this.order_sku_num = order_sku_num;
    }

    public BigDecimal getOrder_amount() {
        return order_amount;
    }

    public void setOrder_amount(BigDecimal order_amount) {
        this.order_amount = order_amount;
    }

    public Long getOrder_ct() {
        return order_ct;
    }

    public void setOrder_ct(Long order_ct) {
        this.order_ct = order_ct;
    }

    public BigDecimal getPayment_amount() {
        return payment_amount;
    }

    public void setPayment_amount(BigDecimal payment_amount) {
        this.payment_amount = payment_amount;
    }

    public Long getPaid_order_ct() {
        return paid_order_ct;
    }

    public void setPaid_order_ct(Long paid_order_ct) {
        this.paid_order_ct = paid_order_ct;
    }

    public Long getRefund_order_ct() {
        return refund_order_ct;
    }

    public void setRefund_order_ct(Long refund_order_ct) {
        this.refund_order_ct = refund_order_ct;
    }

    public BigDecimal getRefund_amount() {
        return refund_amount;
    }

    public void setRefund_amount(BigDecimal refund_amount) {
        this.refund_amount = refund_amount;
    }

    public Long getComment_ct() {
        return comment_ct;
    }

    public void setComment_ct(Long comment_ct) {
        this.comment_ct = comment_ct;
    }

    public Long getGood_comment_ct() {
        return good_comment_ct;
    }

    public void setGood_comment_ct(Long good_comment_ct) {
        this.good_comment_ct = good_comment_ct;
    }

    public Set<Long> getOrderIdSet() {
        return orderIdSet;
    }

    public void setOrderIdSet(Set<Long> orderIdSet) {
        this.orderIdSet = orderIdSet;
    }

    public Set<Long> getPaidOrderIdSet() {
        return paidOrderIdSet;
    }

    public void setPaidOrderIdSet(Set<Long> paidOrderIdSet) {
        this.paidOrderIdSet = paidOrderIdSet;
    }

    public Set<Long> getRefundOrderIdSet() {
        return refundOrderIdSet;
    }

    public void setRefundOrderIdSet(Set<Long> refundOrderIdSet) {
        this.refundOrderIdSet = refundOrderIdSet;
    }

    public Long getTs() {
        return ts;
    }

    public void setTs(Long ts) {
        this.ts = ts;
    }

    @Override
    public String toString() {
        return "ProductStats{" +
                "stt='" + stt + '\'' +
                ", edt='" + edt + '\'' +
                ", sku_id=" + sku_id +
                ", sku_name='" + sku_name + '\'' +
                ", sku_price=" + sku_price +
                ", spu_id=" + spu_id +
                ", spu_name='" + spu_name + '\'' +
                ", tm_id=" + tm_id +
                ", tm_name='" + tm_name + '\'' +
                ", category3_id=" + category3_id +
                ", category3_name='" + category3_name + '\'' +
                ", display_ct=" + display_ct +
                ", click_ct=" + click_ct +
                ", favor_ct=" + favor_ct +
                ", cart_ct=" + cart_ct +
                ", order_sku_num=" + order_sku_num +
                ", order_amount=" + order_amount +
                ", refund_amount=" + refund_amount +
                ", payment_amount=" + payment_amount +
                ", comment_ct=" + comment_ct +
                ", good_comment_ct=" + good_comment_ct +
                ", order_ct=" + order_ct +
                ", paid_order_ct=" + paid_order_ct +
                ", refund_order_ct=" + refund_order_ct +
                ", orderIdSet=" + orderIdSet +
                ", paidOrderIdSet=" + paidOrderIdSet +
                ", refundOrderIdSet=" + refundOrderIdSet +
                ", ts=" + ts +
                '}';
    }

    public static ProductStatsBuilder builder() {
        return new ProductStatsBuilder();
    }

    public static final class ProductStatsBuilder {

        private final ProductStats productStats;

        private ProductStatsBuilder() {
            productStats = new ProductStats();
        }

        public ProductStatsBuilder stt(String stt) {
            productStats.setStt(stt);
            return this;
        }

        public ProductStatsBuilder edt(String edt) {
            productStats.setEdt(edt);
            return this;
        }

        public ProductStatsBuilder sku_id(Long sku_id) {
            productStats.setSku_id(sku_id);
            return this;
        }

        public ProductStatsBuilder sku_name(String sku_name) {
            productStats.setSku_name(sku_name);
            return this;
        }

        public ProductStatsBuilder sku_price(BigDecimal sku_price) {
            productStats.setSku_price(sku_price);
            return this;
        }

        public ProductStatsBuilder spu_id(Long spu_id) {
            productStats.setSpu_id(spu_id);
            return this;
        }

        public ProductStatsBuilder spu_name(String spu_name) {
            productStats.setSpu_name(spu_name);
            return this;
        }

        public ProductStatsBuilder tm_id(Long tm_id) {
            productStats.setTm_id(tm_id);
            return this;
        }

        public ProductStatsBuilder tm_name(String tm_name) {
            productStats.setTm_name(tm_name);
            return this;
        }

        public ProductStatsBuilder category3_id(Long category3_id) {
            productStats.setCategory3_id(category3_id);
            return this;
        }

        public ProductStatsBuilder category3_name(String category3_name) {
            productStats.setCategory3_name(category3_name);
            return this;
        }

        public ProductStatsBuilder display_ct(Long display_ct) {
            productStats.setDisplay_ct(display_ct);
            return this;
        }

        public ProductStatsBuilder click_ct(Long click_ct) {
            productStats.setClick_ct(click_ct);
            return this;
        }

        public ProductStatsBuilder favor_ct(Long favor_ct) {
            productStats.setFavor_ct(favor_ct);
            return this;
        }

        public ProductStatsBuilder cart_ct(Long cart_ct) {
            productStats.setCart_ct(cart_ct);
            return this;
        }

        public ProductStatsBuilder order_sku_num(Long order_sku_num) {
            productStats.setOrder_sku_num(order_sku_num);
            return this;
        }

        public ProductStatsBuilder order_amount(BigDecimal order_amount) {
            productStats.setOrder_amount(order_amount);
            return this;
        }

        public ProductStatsBuilder order_ct(Long order_ct) {
            productStats.setOrder_ct(order_ct);
            return this;
        }

        public ProductStatsBuilder payment_amount(BigDecimal payment_amount) {
            productStats.setPayment_amount(payment_amount);
            return this;
        }

        public ProductStatsBuilder paid_order_ct(Long paid_order_ct) {
            productStats.setPaid_order_ct(paid_order_ct);
            return this;
        }

        public ProductStatsBuilder refund_order_ct(Long refund_order_ct) {
            productStats.setRefund_order_ct(refund_order_ct);
            return this;
        }

        public ProductStatsBuilder refund_amount(BigDecimal refund_amount) {
            productStats.setRefund_amount(refund_amount);
            return this;
        }

        public ProductStatsBuilder comment_ct(Long comment_ct) {
            productStats.setComment_ct(comment_ct);
            return this;
        }

        public ProductStatsBuilder good_comment_ct(Long good_comment_ct) {
            productStats.setGood_comment_ct(good_comment_ct);
            return this;
        }

        public ProductStatsBuilder orderIdSet(Set<Long> orderIdSet) {
            productStats.setOrderIdSet(orderIdSet);
            return this;
        }

        public ProductStatsBuilder paidOrderIdSet(Set paidOrderIdSet) {
            productStats.setPaidOrderIdSet(paidOrderIdSet);
            return this;
        }

        public ProductStatsBuilder refundOrderIdSet(Set refundOrderIdSet) {
            productStats.setRefundOrderIdSet(refundOrderIdSet);
            return this;
        }

        public ProductStatsBuilder ts(Long ts) {
            productStats.setTs(ts);
            return this;
        }

        public ProductStats build() {
            return productStats;
        }
    }


}
